home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Libraries / GUSI 1.4.1 / GUSI / Makefile < prev    next >
Encoding:
Makefile  |  1994-05-04  |  8.9 KB  |  388 lines  |  [TEXT/MPS ]

  1. #######################################################################
  2. #    Project    :    GUSI                -    Grand Unified Socket Interface
  3. #    File        :    Makefile            -    Build everything except examples
  4. #    Author    :    Matthias Neeracher
  5. #    Language    :    MPW Shell/Make
  6. #
  7. #  $Log: Makefile,v $
  8. #  Revision 1.4  1994/05/04  01:46:02  neeri
  9. #  Version 1.4.1
  10. #
  11. #  Revision 1.3  1994/05/01  23:45:47  neeri
  12. #  Install utime.h.
  13. #
  14. #  Revision 1.2  1994/02/25  01:14:06  neeri
  15. #  Clean up log.
  16. #
  17. #  Revision 1.1  1994/02/25  00:46:15  neeri
  18. #  Initial revision
  19. #
  20. #    Revision 0.29  1994/01/11  00:00:00  neeri
  21. #    Release 1.3.5
  22. #    
  23. #    Revision 0.28  1993/11/17  00:00:00  neeri
  24. #    Release 1.3.4, introducing GUSIRemoteConsole
  25. #    
  26. #    Revision 0.27  1993/07/17  00:00:00  neeri
  27. #    Release 1.3.0
  28. #    
  29. #    Revision 0.26  1993/06/20  00:00:00  neeri
  30. #    Release 1.2.0
  31. #    
  32. #    Revision 0.25  1993/06/01  00:00:00  neeri
  33. #    Introduce more conservative dependences
  34. #    
  35. #    Revision 0.24  1993/04/04  00:00:00  neeri
  36. #    Release 1.1.1
  37. #    
  38. #    Revision 0.23  1993/03/14  00:00:00  neeri
  39. #    Use Stuff to build distribution
  40. #    
  41. #    Revision 0.22  1993/01/09  00:00:00  neeri
  42. #    Make list of targets to be built more flexible
  43. #    
  44. #    Revision 0.21  1992/12/18  00:00:00  neeri
  45. #    Watch out for filenames with spaces
  46. #    
  47. #    Revision 0.20  1992/12/06  00:00:00  neeri
  48. #    Automatic Distribution
  49. #    
  50. #    Revision 0.19  1992/11/14  00:00:00  neeri
  51. #    Subset libraries were not working correctly
  52. #    
  53. #    Revision 0.18  1992/10/27  00:00:00  neeri
  54. #    More robust deletion
  55. #    
  56. #    Revision 0.17  1992/10/18  00:00:00  neeri
  57. #    Separate clean and dirty variants
  58. #    
  59. #    Revision 0.16  1992/09/24  00:00:00  neeri
  60. #    Install
  61. #    
  62. #    Revision 0.15  1992/09/08  00:00:00  neeri
  63. #    GUSISocketTest.c
  64. #    
  65. #    Revision 0.14  1992/09/08  00:00:00  neeri
  66. #    Subset libraries
  67. #    
  68. #    Revision 0.13  1992/09/01  00:00:00  neeri
  69. #    Make GUSI configurable
  70. #    
  71. #    Revision 0.12  1992/08/16  00:00:00  neeri
  72. #    TCP/IP files: GUSIINET.cp, GUSITCP.cp, GUSIUDP.cp
  73. #    
  74. #    Revision 0.11  1992/08/03  00:00:00  neeri
  75. #    GUSIBuffer.cp
  76. #    
  77. #    Revision 0.10  1992/08/02  00:00:00  neeri
  78. #    GUSIPPCTest
  79. #    
  80. #    Revision 0.9  1992/07/26  00:00:00  neeri
  81. #    Rewrote GUSIAtlkTest
  82. #    
  83. #    Revision 0.8  1992/07/25  00:00:00  neeri
  84. #    GUSITest
  85. #    
  86. #    Revision 0.7  1992/06/15  00:00:00  neeri
  87. #    GUSIFSp
  88. #    
  89. #    Revision 0.6  1992/06/06  00:00:00  neeri
  90. #    PPC Toolbox domain
  91. #    
  92. #    Revision 0.5  1992/05/12  00:00:00  neeri
  93. #    GUSIAtlkTest
  94. #    
  95. #    Revision 0.4  1992/04/19  00:00:00  neeri
  96. #    Rewrite in C++
  97. #    
  98. #    Revision 0.3  1992/04/17  00:00:00  neeri
  99. #    Reorganize Libraries
  100. #    
  101. #    Revision 0.2  1992/04/12  00:00:00  neeri
  102. #    GUSIUnixTest
  103. #    
  104. #    Revision 0.1  1992/03/24  00:00:00  neeri
  105. #    GUSIDispatch
  106. #    
  107. #######################################################################
  108.  
  109. #######################################################################
  110. # Paths where GUSI components will go 
  111. #
  112.  
  113. GUSICIncludes    =    {CIncludes}
  114. GUSICLibraries    =    {CLibraries}
  115. GUSIRIncludes    =    {RIncludes}
  116.  
  117. #######################################################################
  118. # Comment out GUSI.ps if you don't have SpiderWEB and TeXShop
  119. #
  120.  
  121. GUSI_PS    =    GUSI.ps
  122.  
  123. #######################################################################
  124. # You might not need to change anything below this line 
  125. #
  126.  
  127. GUSI_SOURCES =                        ∂
  128.     GUSIFSp.cp                        ∂
  129.     GUSIDispatch.cp                ∂
  130.     GUSISocket.cp                    ∂
  131.     GUSIFile.cp                        ∂
  132.     GUSISIOW.cp                        ∂
  133.     GUSIBuffer.cp                    ∂
  134.     GUSIUnix.cp                        ∂
  135.     GUSIAppleTalk.cp                ∂
  136.     GUSIPPC.cp                        ∂
  137.     GUSIINET.cp                        ∂
  138.     GUSITCP.cp                        ∂
  139.     GUSIUDP.cp                        ∂
  140.     GUSINetDB.cp                    ∂
  141.     GUSIPAP.cp                        ∂
  142.     GUSICfg.c                        ∂
  143.     GUSIRemoteConsole.cp
  144.         
  145. GUSI_HEADERS =                        ∂
  146.     GUSI.h                            ∂
  147.     GUSI_P.h                            ∂
  148.     TFileSpec.h                        ∂
  149.     compat.h                            ∂
  150.     dirent.h                            ∂
  151.     'machine/ansi.h'                ∂
  152.     'machine/endian.h'            ∂
  153.     'machine/types.h'                ∂
  154.     netdb.h                            ∂
  155.     'netinet/in.h'                    ∂
  156.     'netinet/tcp.h'                ∂
  157.     'sys/cdefs.h'                    ∂
  158.     'sys/errno.h'                    ∂
  159.     'sys/fcntl.h'                    ∂
  160.     'sys/ioctl.h'                    ∂
  161.     'sys/socket.h'                    ∂
  162.     'sys/stat.h'                    ∂
  163.     'sys/time.h'                    ∂
  164.     'sys/types.h'                    ∂
  165.     'sys/uio.h'                        ∂
  166.     'sys/un.h'                        ∂
  167.     'sys/unistd.h'                    ∂
  168.     unistd.h                            ∂
  169.     utime.h
  170.  
  171. OBSOLETE_HEADERS =                                ∂
  172.     "{GUSICIncludes}"'machine/machtypes.h'    ∂
  173.     "{GUSICIncludes}"'sys/ioctl_compat.h'    ∂
  174.     "{GUSICIncludes}"'sys/ttychars.h'        ∂
  175.     "{GUSICIncludes}"'sys/ttydev.h'
  176.     
  177. GUSI_OBJECTS =                        ∂
  178.     :Obj:GUSIFSp.cp.o                ∂
  179.     :Obj:GUSIDispatch.cp.o        ∂
  180.     :Obj:GUSISocket.cp.o            ∂
  181.     :Obj:GUSIFile.cp.o            ∂
  182.     :Obj:GUSISIOW.cp.o            ∂
  183.     :Obj:GUSIBuffer.cp.o            ∂
  184.     :Obj:GUSIUnix.cp.o            ∂
  185.     :Obj:GUSIAppleTalk.cp.o        ∂
  186.     :Obj:GUSIPPC.cp.o                ∂
  187.     :Obj:GUSIINET.cp.o            ∂
  188.     :Obj:GUSITCP.cp.o                ∂
  189.     :Obj:GUSIUDP.cp.o                ∂
  190.     :Obj:GUSINetDB.cp.o            ∂
  191.     :Obj:GUSIPAP.cp.o
  192.  
  193. GUSI_DOC =                        ∂
  194.     GUSI.web                        ∂
  195.     GUSI.tex                        ∂
  196.     GUSI.ps                        ∂
  197.     README
  198.  
  199. GUSI_TARGETS =                    ∂
  200.     GUSI.o                         ∂
  201.     GUSI_Everything.cfg        ∂
  202.     GUSI_Appletalk.cfg        ∂
  203.     GUSI_Internet.cfg            ∂
  204.     GUSI_Unix.cfg                ∂
  205.     GUSI_PPC.cfg                ∂
  206.     GUSI_PAP.cfg                ∂
  207.     GUSIRemoteConsole.o
  208.  
  209. GUSI_LIB =                        ∂
  210.     {GUSI_TARGETS}                ∂
  211.     GUSI.r                        ∂
  212.     GUSI.rsrc
  213.  
  214. GUSI_TEST =                            ∂
  215.     :Examples:GUSITest.c            ∂
  216.     :Examples:GUSITest.h            ∂
  217.     :Examples:GUSITest.r            ∂
  218.     :Examples:GUSITest.rsrc        ∂
  219.     :Examples:GUSITest_P.h        ∂
  220.     :Examples:GUSISocketTest.c    ∂
  221.     :Examples:GUSIAtlkTest.c    ∂
  222.     :Examples:GUSIFileTest.c    ∂
  223.     :Examples:GUSIINETTest.c    ∂
  224.     :Examples:GUSIPPCTest.c        ∂
  225.     :Examples:GUSIUnixTest.c    ∂
  226.     :Examples:GUSIUnixTest.r    ∂
  227.     :Examples:GUSIFinger.c        ∂
  228.     :Examples:GUSIFinger.r        ∂
  229.     :Examples:GUSIPAPTest.c    
  230.         
  231. GUSI_MISC =                            ∂
  232.         MakeAliases                    ∂
  233.         Internalize                    ∂
  234.         Distribution                ∂
  235.         SafeDel                        ∂
  236.         Aliases                        ∂
  237.         GUSI.dn                        ∂
  238.         GUSI.ext                        ∂
  239.         GUSI_C.dn                    ∂
  240.         GUSIINET_P.h                ∂
  241.         GUSIPPC_P.h                    ∂
  242.         GUSIRsrc_P.h                ∂
  243.         Makefile                        ∂
  244.         '/etc/services'
  245.  
  246. GUSI_DISTR    =                        ∂
  247.         {GUSI_SOURCES}             ∂
  248.         {GUSI_HEADERS}                ∂
  249.         {GUSI_DOC}                     ∂
  250.         {GUSI_LIB}                     ∂
  251.         {GUSI_TEST}                    ∂
  252.         {GUSI_MISC}
  253.         
  254. Debug    =    
  255.  
  256. COptions = -r -mbg on -sym on -i : -i :include
  257. CPlusOptions = -mf -mbg on -sym on -i : -i :include {Debug}
  258. LOptions    = -sym on -mf -w
  259. ROptions = -i :
  260.  
  261. :Obj:            ƒ    :
  262.  
  263. Help            ƒ
  264.     Echo "Top level targets are:"
  265.     Echo "∂tInstall    - Install GUSI"
  266.     Echo "∂tUninstall  - Try to remove GUSI"
  267.     Echo "∂tGUSI       - Rebuild GUSI (use with care)"
  268.     Echo "∂tGUSITest   - Build GUSI Examples"
  269.     
  270. Alias.dump     ƒ  "{Libraries}Runtime.o" "{CLibraries}StdCLib.o" "{CLibraries}CPlusLib.o"
  271.     DumpObj -mods "{Libraries}Runtime.o" > Alias.dump
  272.     DumpObj -mods "{CLibraries}StdCLib.o" >> Alias.dump
  273.     DumpObj -mods "{CLibraries}CPlusLib.o" >> Alias.dump
  274.  
  275. Alias.rn    ƒ    Aliases Alias.dump
  276.     MakeAliases Alias.dump
  277.  
  278. GUSI.dn        ƒ    preGUSI.o GUSI.ext
  279.     DumpObj -mods preGUSI.o    | Internalize
  280.  
  281. StdLib.o    ƒ Alias.rn
  282.     Lib -w -o StdLib.o            ∂
  283.         -sg GUSILib=Main            ∂
  284.         `Catenate Alias.rn`        ∂
  285.         "{Libraries}Runtime.o"    ∂
  286.         "{CLibraries}StdCLib.o"    ∂
  287.         "{CLibraries}CPlusLib.o"∂
  288.         "{Libraries}dnr.o"        ∂
  289.         -df Alias1.df
  290.  
  291. #######################################################################
  292. # The full library
  293. #
  294.  
  295. preGUSI.o    ƒ    {GUSI_OBJECTS} Alias.rn StdLib.o
  296.     Lib -w -o preGUSI.o            ∂
  297.         {GUSI_OBJECTS}                ∂
  298.         StdLib.o                        ∂
  299.         -sg Main=GUSIResident    ∂
  300.         -df Alias.df
  301.  
  302. GUSI.o        ƒ    preGUSI.o GUSI.dn
  303.     Set Echo 0
  304.     Echo "∂t∂tLib" -w -o GUSI.o ...
  305.     Lib -w -o GUSI.o preGUSI.o `Catenate GUSI.dn`
  306.     Set Echo 1
  307.  
  308. GUSI_Everything.cfg    ƒ    GUSICfg.c
  309.     C -d GUSI_Everything -o GUSI_Everything.cfg GUSICfg.c
  310.  
  311. GUSI_Appletalk.cfg    ƒ    GUSICfg.c
  312.     C -d GUSI_Appletalk -o GUSI_Appletalk.cfg GUSICfg.c
  313.  
  314. GUSI_Internet.cfg    ƒ    GUSICfg.c
  315.     C -d GUSI_Internet -o GUSI_Internet.cfg GUSICfg.c
  316.  
  317. GUSI_Unix.cfg    ƒ    GUSICfg.c
  318.     C -d GUSI_Unix -o GUSI_Unix.cfg GUSICfg.c
  319.  
  320. GUSI_PPC.cfg    ƒ    GUSICfg.c
  321.     C -d GUSI_PPC -o GUSI_PPC.cfg GUSICfg.c
  322.  
  323. GUSI_PAP.cfg    ƒ    GUSICfg.c
  324.     C -d GUSI_PAP -o GUSI_PAP.cfg GUSICfg.c
  325.  
  326. GUSIRemoteConsole.o    ƒ    GUSIRemoteConsole.cp
  327.     {CPlus} {CPlusOptions} GUSIRemoteConsole.cp -o GUSIRemoteConsole.o
  328.  
  329. #######################################################################
  330. # Clean namespace
  331. #
  332.  
  333. GUSI_C.o        ƒ    GUSI.o GUSI.dn
  334.     Lib -o GUSI_C.o                ∂
  335.         GUSI.o                        ∂
  336.         `Catenate GUSI_C.dn`
  337.     
  338. GUSI.tex            ƒ    GUSI.web
  339.     cweave GUSI
  340.     
  341. GUSI.dvi            ƒ    GUSI.tex
  342.     tex GUSI
  343.  
  344. GUSI.ps            ƒ    GUSI.dvi
  345.     dvips -a -Z GUSI.dvi -o GUSI.ps
  346.     
  347. GUSI                 ƒ    {GUSI_TARGETS} {GUSI_DOC}
  348.  
  349. Install            ƒ
  350.     :SafeInstall -to "{GUSICLibraries}"                        {GUSI_TARGETS}
  351.     :SafeInstall -to "{GUSICIncludes}" -from include    {GUSI_HEADERS} GUSIRsrc_P.h
  352.     :SafeInstall -to "{GUSIRIncludes}"    GUSI.r GUSI.rsrc :include:GUSIRsrc_P.h
  353.     :SafeDel {OBSOLETE_HEADERS}
  354.     :SafeInstall -y -to "{PrefsFolder}:"    '/etc/services'
  355.         
  356. Uninstall        ƒ
  357.     :SafeDel "{CLibraries}GUSI.o" "{CLibraries}GUSI_F.o"
  358.     For i in {GUSI_HEADERS}
  359.         :SafeDel "{GUSICIncludes}{i}"
  360.     End    
  361.     :SafeDel "{RIncludes}GUSI.r" "{RIncludes}GUSI.rsrc" "{RIncludes}GUSIRsrc_P.h" 
  362.     
  363. GUSITest            GUSIFileTest    ∂
  364. GUSIFinger        GUSIPAPTest        ∂
  365. GUSIUnixTest    GUSIUnixTest2    ∂
  366. GUSIAtlkTest    GUSIAtlkTest2    ∂
  367. GUSIPPCTest        GUSIPPCTest2    ∂
  368. GUSIINETTest    GUSIINETTest2    ƒ    $OutOfDate
  369.     Directory Examples
  370.         Set OldEcho {Echo}
  371.         Set Echo 0
  372.         BuildProgram {Targ}
  373.         Set Echo {OldEcho}
  374.     Directory ::
  375.  
  376. GUSICleanDep    ƒ
  377.     :SafeDel '≈.dn' '≈.rn' '≈.df'
  378.  
  379. Clean    ƒ
  380.     :SafeDel '≈.dn' '≈.rn' '≈.df' '≈.o' '≈.toc' '≈.tex' '≈.log' '≈.dump' '≈.sym'
  381.  
  382. RealClean ƒ    Clean
  383.     :SafeDel '≈.dvi' '≈.ps' '-t APPL'
  384.  
  385. Distribution ƒ GUSI
  386.     :Distribute GUSI.distr GUSI_141.sit
  387.  
  388. Distr ƒ Distribution